<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>商家入驻资料审核</title>
    <link href="./bootstrap/css/bootstrap.css" rel="stylesheet" type="text/css"/>
    <script src="https://s3.pstatp.com/cdn/expire-1-M/jquery/3.1.1/jquery.min.js"></script>
    <script src="./bootstrap/js/bootstrap.js"></script>
    <script>
        //DOM 加载完毕或网页加载完毕要执行的函数
        window.onload = function () {
            //调用后台的接口（获取所有商家信息的接口）
            $.ajax({
                //后台接口的地址
                url: 'plateform/list',
                //请求的方式
                type: 'get',
                dataType: "json",
                //请求成功要执行的函数
                success: function (res) {
                    //data是后台返回的数据
                    //console.log('平台审核商家返回的商家数据',data);
                    if (res.code === 200) {
                        let resuData = res.data
                        for (let i = 0; i < resuData.length; i++) {
                            $("<tr><td>"+resuData[i].mid+"</td><td>"+resuData[i].mcontact+"</td><td>"+resuData[i].mphone+"</td><td>"+resuData[i].memail+"</td><td>"+resuData[i].maddress+"</td><td>"+resuData[i].merchantType+"</td><td>"+resuData[i].mrealName+"</td><td>"+resuData[i].midCard+"</td><td>"+"<img style='width: 50px;height: 50px;' src="+resuData[i].midCardImg+">"+"</td><td><button class='btn btn-success'>通过</button>&nbsp;&nbsp;<button class='btn btn-danger'>拒绝</button></td></tr>").appendTo($("#tb"));
                        }
                    }
                }
            });
        }
    </script>
</head>
<body>
<!--
    <form class="form-horizontal">
        <div class="form-group">
            <label for="inputmcontact" class="col-sm-2 control-label">商家联系人</label>
            <div class="col-sm-8">
                <input type="email" class="form-control" id="inputmcontact" placeholder="请输入商家联系人">
            </div>
        </div>
        <div class="form-group">
            <label for="inputmphone" class="col-sm-2 control-label">商家联系方式</label>
            <div class="col-sm-8">
                <input type="password" class="form-control" id="inputmphone" placeholder="请输入商家联系方式">
            </div>
        </div>
        <div class="form-group">
            <label for="inputmemail" class="col-sm-2 control-label">商家联系邮箱</label>
            <div class="col-sm-8">
                <input type="password" class="form-control" id="inputmemail" placeholder="请输入商家联系邮箱">
            </div>
        </div>
        <div class="form-group">
            <label for="inputmaddress" class="col-sm-2 control-label">商家联系地址</label>
            <div class="col-sm-8">
                <input type="password" class="form-control" id="inputmaddress" placeholder="请输入商家联系地址">
            </div>
        </div>
        <div class="form-group">
            <label for="inputmerchantType" class="col-sm-2 control-label">商家类型</label>
            <div class="col-sm-8">
                <select id="inputmerchantType" class="form-control">
                    <option value="1">个人</option>
                    <option value="2">企业</option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label for="inputmrealName" class="col-sm-2 control-label">商家真实名称</label>
            <div class="col-sm-8">
                <input type="password" class="form-control" id="inputmrealName" placeholder="请输入商家真实名称">
            </div>
        </div>
        <div class="form-group">
            <label for="inputmidCard" class="col-sm-2 control-label">商家证件号</label>
            <div class="col-sm-8">
                <input type="password" class="form-control" id="inputmidCard" placeholder="请输入商家证件号">
            </div>
        </div>
        <div class="form-group">
            <label for="file" class="col-sm-2 control-label">商家证件图</label>
            <div class="col-sm-8">
                <input type="file" class="form-control" id="file">
            </div>
        </div>

    </form>
    <div class="form-group">
        <div class="col-sm-offset-2 col-sm-8">
            <button type="button" class="btn btn-success">提交</button>
        </div>
    </div>
    -->
<nav class="navbar navbar-default">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header">
            <a class="navbar-brand" href="#">Brand</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
            <form class="navbar-form navbar-left">
                <div class="form-group">
                    <input type="text" class="form-control" placeholder="Search">
                </div>
                <button type="submit" class="btn btn-default">Submit</button>
            </form>
        </div><!-- /.navbar-collapse -->
    </div><!-- /.container-fluid -->
</nav>
    <table class="table table-striped table-hover">
        <thead>
            <th>#</th>
            <th>联系人</th>
            <th>联系方式</th>
            <th>联系邮箱</th>
            <th>联系地址</th>
            <th>类型</th>
            <th>真实名称</th>
            <th>证件号</th>
            <th>证件图</th>
            <th>操作</th>
        </thead>
        <tbody id="tb">

        </tbody>
        <tfoot>
            <tr>
                <td colspan="10">
                    这里显示分页条（分页信息）
                </td>
            </tr>
        </tfoot>
    </table>
</body>
</html>